import echarts from 'echarts'
const allData = {
  productPlan: [
    { name: '白菜', plan: 78 },
    { name: '猪肉', plan: 78 },
    { name: '青萝卜', plan: 78 },
    { name: '羊排', plan: 78 },
    { name: '金针菇', plan: 78 },
    { name: '西红柿', plan: 78 },
    { name: '苦笋干', plan: 78 },
    { name: '长红茄', plan: 78 },
    { name: '秋茄子', plan: 78 },
    { name: '长豆角', plan: 78 },
    { name: '紫薯', plan: 78 },
    { name: '春笋', plan: 78 },
    { name: '豆泡', plan: 78 },
    { name: '本地胡萝卜', plan: 78 },
    { name: '散花', plan: 78 },
    { name: '大葱', plan: 78 },
    { name: '芦笋', plan: 78 },
    { name: '艾米果', plan: 78 },
    { name: '新鲜黑木耳', plan: 78 },
    { name: '味椒酱', plan: 78 },
  ],
  clientPlan: [],
  finishClientPlan: [],
  sorterID: [
    { name: '田利东', num: 204 },
    { name: '王家灿', num: 116 },
    { name: '黄分拣', num: 204 },
    { name: '何', num: 102 },
    { name: '张武', num: 96 },
    { name: '娜子', num: 86 },
    { name: '周丽云', num: 75 },
    { name: 'yh', num: 66 },
    { name: 'xinyin', num: 61 },
    { name: 'fenjian01', num: 56 },
  ],
  gaugeChart: {
    backgroundColor: 'transparent',
    title: {
        text: 0 +'%',
        x: 'center',
        y: 'center',
        textStyle: {
            fontSize: 40,
            color: '#C0C0C0'
        }
    },
    series: [
        {
            type: 'gauge',
            radius: '64%',
            clockwise: false,
            hoverAnimation: true,
            center: ['50%', '50%'],
            startAngle: '90',
            endAngle: '-269.9999',
            splitNumber: 25,
            detail: {
                offsetCenter: [0, -20],
                formatter: ' '
            },
            pointer: {
                show: false
            },
            axisLine: {
                show: true,
                lineStyle: {
                    color: [
                        [0, 'red'],
                        [0, 'rgba(32,187,252,0.15)'],
                        [1, '#7dedff']
                    ],
                    width: 10
                }
            },
            axisTick: {
                show: false
            },
            splitLine: {
                show: true,
                length: 12,
                lineStyle: {
                    color: '#051F54',
                    width: 3
                }
            },
            axisLabel: {
                show: false
            }
        },
        {
            type: 'pie',
            name: '外层细圆环',
            radius: ['68%', '70%'],
            center: ['50%', '50%'],
            hoverAnimation: false,
            clockWise: false,
            itemStyle: {
                normal: {
                    color: '#9ed2fe'
                }
            },
            label: {
                show: false
            },
            data: [100]
        },
        {
            name: '最外层点圆环',
            type: 'gauge',
            splitNumber: 22,
            radius: '78%',
            center: ['50%', '50%'],
            startAngle: 0,
            endAngle: 359.9999,
            hoverAnimation: true,
            axisLine: {
                show: false
            },
            axisTick: {
                show: true,
                lineStyle: {
                    color: '#02b5fd',
                    width: 1.5,
                    shadowBlur: 1,
                    shadowColor: '#00B1BF',
                },
                length: 3,
                splitNumber: 5
            },
            splitLine: {
                show: false
            },
            axisLabel: {
                show: false
            },
            detail: {
                show: false
            }
        }
    ]
  },
  gaugeInfo: {
    time: '2023-06-27',
    totality: 0,
    sortNum: 0,
    notSortNum: 0
  },
  lackProduct: [
    { name: '白菜', num: 204 },
    { name: '芦笋', num: 116 },
    { name: '黑木耳', num: 102 },
    { name: '豆泡', num: 96 },
    { name: '紫薯', num: 86 }
  ],
  lineChart: {
    tooltip: {
      trigger: 'axis',
      formatter: (params) => {
        var relVal = params[0].name
        for (let i = 0;i < params.length; i++) {
          relVal += '<br/>' + params[i].marker + ' ' + params[i].seriesName + ' ' + params[i].value + '个'
        }
        return relVal
      }
    },
    grid: {
      left: '3%',
      top: '17%',
      right: '3%',
      bottom: '12%',
    },
    legend: {
      data: ['分拣订单数', '分拣包裹数'],
      right: '3%',
      top: '0',
      orient: 'horizontal',
      textStyle: {
        color: '#fff',
        fontSize: 14
      }
    },
    xAxis: {
      type: 'category',
      boundaryGap: false,
      data: [],
      axisLabel: {
        color: '#fff', // 坐标轴名称颜色
        fontSize: 14,
      },
      axisLine: {
        lineStyle: {
          color: '#fff'
        }
      }
    },
    yAxis: {
      type: 'value',
      axisLabel: {
        color: '#fff', // 坐标轴名称颜色
        fontSize: 14,
        align: 'left',
        margin: 30
      },
      name: '单位/个',
      nameTextStyle: {
        color: '#fff',
        align: 'center',
        padding: [0,0,0,-18]
      },
      axisLine: {
        show: false,
      },
      splitLine: { // 控制网格线样式
        show: true,
        lineStyle: {
            color: '#fff', // 网格线颜色
            width: 1, // 网格线宽度
            type: 'dashed' // 网格线类型
        }
    }
    },
    series: [
      {
        data: [],
        type: 'line',
        name: '分拣订单数',
        lineStyle: {
          normal: {
            color: '#1D80DA', // 折线颜色
            width: 2,
            shadowColor: 'rgba(34,150,243, 0.3)' // 折线阴影颜色
          }
        },
        itemStyle: {
          normal: {
            color: '#1D80DA' // 折线小圆点颜色
          }
        },
        areaStyle: {
          normal: {
            color: new echarts.graphic.LinearGradient(
              0,
              0,
              0,
              1,
              [
                {
                  offset: 0,
                  color: 'rgba(29,128,218, .3)' // 折线底下区域渐变色
                },
                {
                  offset: 0.8,
                  color: 'rgba(29,128,218, .6)' // 折线底下区域渐变色
                }
              ],
              false
            )
          }
        }
      },
      {
        data: [],
        type: 'line',
        name: '分拣包裹数',
        lineStyle: {
          normal: {
            color: '#02F4FF', // 折线颜色
            width: 2,
            shadowColor: 'rgba(34,150,243, 0.3)' // 折线阴影颜色
          }
        },
        itemStyle: {
          normal: {
            color: '#02F4FF' // 折线小圆点颜色
          }
        },
        areaStyle: {
          normal: {
            color: new echarts.graphic.LinearGradient(
              0,
              0,
              0,
              1,
              [
                {
                  offset: 0,
                  color: 'rgba(2,244,255, .2)' // 折线底下区域渐变色
                },
                {
                  offset: 0.8,
                  color: 'rgba(2,244,255, .4)' // 折线底下区域渐变色
                }
              ],
              false
            )
          }
        }
      }
    ]
  },
  pieChart: {
    legend: {
      bottom: '5',
      textStyle: {
        color: '#fff'
      },
      type: "scroll",
      pageTextStyle: {
        color: "#fff", //翻页数字颜色
      },
      pageIconSize: 16,
    },
    tooltip: {
      trigger: 'item',
    },
    series: [
      {
        type: 'pie',
        radius: [0, 90],
        center: ['50%', '50%'],
        itemStyle: {
          borderRadius: 8
        },
        roseType: 'radius',
        label:{
          position: 'outside',
          formatter: function(data){
            return `${data.percent.toFixed(1)}%`
          },
        },
        animationType: 'scale',
        animationEasing: 'elasticOut',
        animationDelay: function (idx) {
          return Math.random() * 100;
        },
        data: [
          // { value: 40, name: '白菜【斤】', itemStyle: { color: '#00FCFF' } },
          // { value: 38, name: '木耳【斤】', itemStyle: { color: '#08EE8A' } },
          // { value: 32, name: '芦笋【斤】', itemStyle: { color: '#1DC0DE' } },
          // { value: 30, name: '豆泡【斤】', itemStyle: { color: '#2871B5' } },
          // { value: 28, name: '紫薯【斤】', itemStyle: { color: '#00C0FF' } },
          // { value: 28, name: '韭菜1【斤】', itemStyle: { color: '#0072FF' } },
          // { value: 40, name: '白菜2【斤】', itemStyle: { color: '#00FCFF' } },
          // { value: 38, name: '木3【斤】', itemStyle: { color: '#08EE8A' } },
          // { value: 32, name: '芦笋4【斤】', itemStyle: { color: '#1DC0DE' } },
          // { value: 30, name: '豆泡5【斤】', itemStyle: { color: '#2871B5' } },
          // { value: 28, name: '紫薯6【斤】', itemStyle: { color: '#00C0FF' } },
        ]
      }
    ]
  }
}
export default allData